.class public Lcom/jecelyin/editor/v2/b;
.super Ljava/lang/Object;
.source "EditorHelper.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/jecelyin/editor/v2/b$c;,
        Lcom/jecelyin/editor/v2/b$b;,
        Lcom/jecelyin/editor/v2/b$a;
    }
.end annotation


# static fields
.field private static a:Landroid/content/Context;

.field private static b:Z

.field private static c:Z

.field private static d:Lcom/jecelyin/editor/v2/b$a;

.field private static e:Lcom/jecelyin/editor/v2/b$b;


# direct methods
.method public static a()Landroid/content/Context;
    .locals 1

    .line 11
    sget-object v0, Lcom/jecelyin/editor/v2/b;->a:Landroid/content/Context;

    return-object v0
.end method

.method public static a(Landroid/app/Activity;Ljava/lang/String;)Ljava/io/OutputStream;
    .locals 1

    .line 20
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0, p1}, Lcom/jecelyin/editor/v2/b$b;->a(Landroid/app/Activity;Ljava/lang/String;)Ljava/io/OutputStream;

    move-result-object p0

    return-object p0
.end method

.method public static a(Landroid/net/Uri;)Ljava/lang/String;
    .locals 1

    .line 24
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0}, Lcom/jecelyin/editor/v2/b$b;->a(Landroid/net/Uri;)Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method public static a(I)V
    .locals 1

    .line 27
    sget-object v0, Lcom/jecelyin/editor/v2/b;->d:Lcom/jecelyin/editor/v2/b$a;

    if-eqz v0, :cond_0

    .line 28
    invoke-interface {v0, p0}, Lcom/jecelyin/editor/v2/b$a;->a(I)V

    :cond_0
    return-void
.end method

.method public static a(Landroid/content/Context;I)V
    .locals 2

    .line 13
    invoke-static {}, Lcom/jecelyin/editor/v2/b;->d()Z

    move-result v0

    if-nez v0, :cond_0

    .line 14
    sget p1, Lcom/jecelyin/editor/v2/m;->iap_service_disconnected:I

    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p0

    invoke-virtual {p0}, Landroid/widget/Toast;->show()V

    return-void

    .line 15
    :cond_0
    :try_start_0
    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.estrongs.action.EDITOR_GO_VIP_PAGE"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v1, "from"

    .line 16
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const/high16 p1, 0x10000000

    .line 17
    invoke-virtual {v0, p1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 18
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p0

    .line 19
    invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V

    :goto_0
    return-void
.end method

.method private static a(Lcom/jecelyin/editor/v2/b$c;)V
    .locals 2

    .line 1
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->a(Lcom/jecelyin/editor/v2/b$c;)Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x0

    if-eqz v0, :cond_4

    .line 2
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->b(Lcom/jecelyin/editor/v2/b$c;)Ljava/lang/Boolean;

    move-result-object v0

    if-eqz v0, :cond_3

    .line 3
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->c(Lcom/jecelyin/editor/v2/b$c;)Ljava/lang/Boolean;

    move-result-object v0

    if-eqz v0, :cond_2

    .line 4
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->d(Lcom/jecelyin/editor/v2/b$c;)Lcom/jecelyin/editor/v2/b$b;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 5
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->e(Lcom/jecelyin/editor/v2/b$c;)Lcom/jecelyin/editor/v2/b$a;

    move-result-object p0

    if-eqz p0, :cond_0

    return-void

    :cond_0
    const-string p0, "setEventReporter(EventReporter)"

    .line 6
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b;->c(Ljava/lang/String;)V

    throw v1

    :cond_1
    const-string p0, "setIODelegate(IEditorIODelegate)"

    .line 7
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b;->c(Ljava/lang/String;)V

    throw v1

    :cond_2
    const-string p0, "setIsPremium(boolean)"

    .line 8
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b;->c(Ljava/lang/String;)V

    throw v1

    :cond_3
    const-string p0, "setIsSupportPremium(boolean)"

    .line 9
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b;->c(Ljava/lang/String;)V

    throw v1

    :cond_4
    const-string p0, "setContext(Context)"

    .line 10
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b;->c(Ljava/lang/String;)V

    throw v1
.end method

.method public static a(Ljava/lang/String;Lorg/json/JSONObject;)V
    .locals 1

    .line 25
    sget-object v0, Lcom/jecelyin/editor/v2/b;->d:Lcom/jecelyin/editor/v2/b$a;

    if-eqz v0, :cond_0

    .line 26
    invoke-interface {v0, p0, p1}, Lcom/jecelyin/editor/v2/b$a;->a(Ljava/lang/String;Lorg/json/JSONObject;)V

    :cond_0
    return-void
.end method

.method public static a(Z)V
    .locals 0

    .line 12
    sput-boolean p0, Lcom/jecelyin/editor/v2/b;->b:Z

    return-void
.end method

.method public static a(Ljava/lang/String;)Z
    .locals 1

    .line 23
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0}, Lcom/jecelyin/editor/v2/b$b;->a(Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method public static a([Ljava/lang/String;)Z
    .locals 1

    .line 21
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0}, Lcom/jecelyin/editor/v2/b$b;->a([Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method public static a(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
    .locals 1

    .line 22
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0, p1}, Lcom/jecelyin/editor/v2/b$b;->b(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method public static b()Ljava/lang/String;
    .locals 1

    .line 9
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0}, Lcom/jecelyin/editor/v2/b$b;->a()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static b(Lcom/jecelyin/editor/v2/b$c;)V
    .locals 1

    .line 1
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b;->a(Lcom/jecelyin/editor/v2/b$c;)V

    .line 2
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->a(Lcom/jecelyin/editor/v2/b$c;)Landroid/content/Context;

    move-result-object v0

    sput-object v0, Lcom/jecelyin/editor/v2/b;->a:Landroid/content/Context;

    .line 3
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->b(Lcom/jecelyin/editor/v2/b$c;)Ljava/lang/Boolean;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    sput-boolean v0, Lcom/jecelyin/editor/v2/b;->c:Z

    .line 4
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->c(Lcom/jecelyin/editor/v2/b$c;)Ljava/lang/Boolean;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    sput-boolean v0, Lcom/jecelyin/editor/v2/b;->b:Z

    .line 5
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->d(Lcom/jecelyin/editor/v2/b$c;)Lcom/jecelyin/editor/v2/b$b;

    move-result-object v0

    sput-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    .line 6
    invoke-static {p0}, Lcom/jecelyin/editor/v2/b$c;->e(Lcom/jecelyin/editor/v2/b$c;)Lcom/jecelyin/editor/v2/b$a;

    move-result-object p0

    sput-object p0, Lcom/jecelyin/editor/v2/b;->d:Lcom/jecelyin/editor/v2/b$a;

    return-void
.end method

.method public static b(Z)V
    .locals 1

    .line 10
    sget-object v0, Lcom/jecelyin/editor/v2/b;->d:Lcom/jecelyin/editor/v2/b$a;

    if-eqz v0, :cond_0

    .line 11
    invoke-interface {v0, p0}, Lcom/jecelyin/editor/v2/b$a;->a(Z)V

    :cond_0
    return-void
.end method

.method public static b(Ljava/lang/String;)Z
    .locals 1

    .line 8
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0}, Lcom/jecelyin/editor/v2/b$b;->b(Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method public static b(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 1

    .line 7
    sget-object v0, Lcom/jecelyin/editor/v2/b;->e:Lcom/jecelyin/editor/v2/b$b;

    invoke-interface {v0, p0, p1}, Lcom/jecelyin/editor/v2/b$b;->a(Ljava/lang/String;Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method private static c(Ljava/lang/String;)V
    .locals 3

    .line 1
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "\u5fc5\u987b\u8c03\u7528 {Params."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p0, "} \u5e76\u4e14\u53c2\u6570\u4e0d\u53ef\u4e3a\u7a7a"

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public static c()Z
    .locals 1

    .line 2
    sget-boolean v0, Lcom/jecelyin/editor/v2/b;->b:Z

    return v0
.end method

.method public static d()Z
    .locals 1

    .line 1
    sget-boolean v0, Lcom/jecelyin/editor/v2/b;->c:Z

    return v0
.end method

.method public static e()V
    .locals 1

    .line 1
    sget-object v0, Lcom/jecelyin/editor/v2/b;->d:Lcom/jecelyin/editor/v2/b$a;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/jecelyin/editor/v2/b$a;->a()V

    :cond_0
    return-void
.end method
